﻿@model HexagonWeb.Models.Airline

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "预订";
}
<h4>航班信息</h4>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Num)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.EscapeDistrict)-@Html.DisplayNameFor(model => model.ArriveDistrict)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Type)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.WeekDay)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.EscapeTime)-@Html.DisplayNameFor(model => model.ArriveTime)
        </th>
    </tr>
        <tr>
            <th>
                @Html.DisplayFor(model => model.Num)
            </th>
            <th>
                @Html.DisplayFor(model => model.EscapeDistrict)-@Html.DisplayFor(model => model.ArriveDistrict)
            </th>

            @{if (Model.Type == 0)
            {
                <th>airbus 330</th>
            }
            else
            {
                <th>boeing 747－400</th>
            }
            }
            <th>
                @Html.DisplayFor(model => model.WeekDay)
            </th>
            <th>
                @Html.DisplayFor(model => model.EscapeTime)-@Html.DisplayFor(model => model.ArriveTime)
            </th>
            @*<td>
                @Html.DisplayFor(model => model.TopCost)
            </td>
            <td>
                @Html.DisplayFor(model => model.MidCost)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.LowCost)
            </td>*@
            @*<td>
                @Html.ActionLink("预订", "Select", new { id = item.ID })
            </td>*@
        </tr>
</table>

<hr/>
<h4>个人信息</h4>
@using (Html.BeginForm("Buy","Airline"))
{
    @Html.HiddenFor(model => model.ID)
    <table class="table-condensed">
        <tr>
            <td>
                座位等级
            </td>
            <td>
                优先选择
            </td>
            <td>
                专门服务请求
            </td>
        </tr>
        <tr>
            <td>
             @Html.DropDownList("LevelCost", new List<SelectListItem>() {
             new SelectListItem()
             {Text = "最高等级 (" + Html.DisplayFor(model => model.TopCost)+")",
               Value = Html.DisplayFor(model => model.TopCost).ToString()
             },
             new SelectListItem()
             {Text = "商业等级 (" + Html.DisplayFor(model => model.MidCost)+")",
               Value = Html.DisplayFor(model => model.MidCost).ToString()
             },
             new SelectListItem()
             {Text = "经济等级 (" + Html.DisplayFor(model => model.LowCost)+")",
               Value = Html.DisplayFor(model => model.LowCost).ToString()
             }
         }, "---请选择---")
            </td>
            <td>
                @ViewBag.Option
            </td>
            <td>
                @ViewBag.Service
            </td>
            <td>
                <input  class ="btn-primary" type ="submit" value="提交" />
            </td> 
            <td>
                @Html.ValidationSummary(true, "", new { @class = "text-danger" })
            </td>
        </tr>
    </table>
}






